package com.base.library.base

import com.base.library.delegate.ItemViewTypeDelegate
import com.base.library.entity.ItemDataBinding

open class BaseMultiRecyclerAdapter<T>(
    private val itemBindingMap: Map<Int, ItemDataBinding>,
    private val itemDelegate: ItemViewTypeDelegate<T>
) : BaseRecyclerAdapter<T>(null) {
    override fun getItemViewType(position: Int): Int {
        return itemDelegate.getItemViewType(position, mDataList[position])
    }

    override fun getItemBinding(viewType: Int): ItemDataBinding? {
        return itemBindingMap[viewType]
    }
}